package com.eksframework.commons.json;

import com.fasterxml.jackson.databind.ObjectMapper;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.context.annotation.Configuration;

import javax.annotation.Resource;

/**
 ** Json启动运行
 *
 * @author: chenfenghai
 * @version: 1.0
 * @date: 2020-05-08 17:14
 * @blame Team
 */
@Configuration
public class JsonStarterConfiguration implements ApplicationRunner {

    @Resource
    ObjectMapper objectMapper;

    /**
     ** 启动运行
     *
     * @param args 参数
     * @throws Exception 异常
     */
    @Override
    public void run(ApplicationArguments args) throws Exception {
        EksJson.setMapper(objectMapper);
    }

}
